package ArrayTest.Homework.HotelTest;

public class Room {
    private int num;
    private String type;
    private boolean flag; //房间是否空闲 true为空闲，false为已入住

    public Room(){

    }
    public Room(int num, String type, boolean flag){
        this.num = num;
        this.type = type;
        this.flag = flag;
    }
    public int getNum(){
        return this.num;
    }
    public void setNum(int num){
        this.num = num;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String toString(){
        return "[房间编号:"+this.num+" 房间类型:"+this.type+" 房间状态:"+(this.flag?"空闲":"已入住")+"]";
    }


}
